﻿using System;
using Engine;
using Engine.Graphics;

namespace Game
{

    public class 金萝卜 : FlatBlock
    {
        public const int Index = 691;

        public override void Initialize()
        {
            base.Initialize();
            this.m_texture = ContentManager.Get<Texture2D>("Textures/items/carrot_golden", null);
        }
        public override int GetTextureSlotCount(int value)
        {
            return 1;
        }


        public override int GetFaceTextureSlot(int face, int value)
        {
            if (face == -1)
            {
                return 0;
            }
            return this.DefaultTextureSlot;
        }





        public override void GenerateTerrainVertices(BlockGeometryGenerator generator, TerrainGeometry geometry, int value, int x, int y, int z)
        {
        }


        public override void DrawBlock(PrimitivesRenderer3D primitivesRenderer, int value, Color color, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
        {
            BlocksManager.DrawFlatBlock(primitivesRenderer, value, size * 1f, ref matrix, this.m_texture, Color.White, true, environmentData);
        }



        private Texture2D m_texture;
    }
}
